project(Engine)

cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED on)

add_definitions(-DSOURCE_PATH="${CMAKE_SOURCE_DIR}/resource")
add_definitions(-D_DEBUG)

# vs设置头文件
file(GLOB_RECURSE VKRENDERER_HEADERS  ./vulkanRenderer/*.h ./vulkanRenderer/*.hpp)
file(GLOB_RECURSE VKRENDERER_SOURCE  ./vulkanRenderer/*.cpp)

# vulkan
include_directories(${CMAKE_SOURCE_DIR}/external/vulkan/Include)
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
    set(VULKAN_LIBRARY "${CMAKE_SOURCE_DIR}/external/vulkan/libs/libvulkan.so")
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
    set(VULKAN_LIBRARY "${CMAKE_SOURCE_DIR}/external/vulkan/libs/vulkan-1.lib")
endif ()

# glfw
include_directories(${CMAKE_SOURCE_DIR}/external/glfw/include)

#gli glm
include_directories(${CMAKE_SOURCE_DIR}/external/glm)
include_directories(${CMAKE_SOURCE_DIR}/external/gli)

# stb
include_directories(${CMAKE_SOURCE_DIR}/external/stb)

# assimp
include_directories(${CMAKE_SOURCE_DIR}/external/assimp/include)

# link libs
link_directories(${CMAKE_SOURCE_DIR}/external/libs)

set(TEST_SRC ./test.cpp ${VKRENDERER_SOURCE})
add_executable(testApp WIN32 ${TEST_SRC} ${VKRENDERER_HEADERS})
target_link_libraries(testApp assimp glfw3d ${VULKAN_LIBRARY})